﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'rightFindByType')
	BEGIN
		DROP  Procedure  rightFindByType
	END
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[rightFindByType]
	@app_id INT,
	@type VARCHAR(50)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT *
	FROM lit_privilegio
	WHERE lit_aplicacion_id = @app_id
	AND lit_privilegio_tipo = @type
	ORDER BY lit_privilegio_nombre;
END
GO